<template>
    <ion-page>
        <ion-header>
            <ion-toolbar color="light" class="pub-hearder">
                <ion-buttons slot="start">
                    <ion-back-button text=""></ion-back-button>
                </ion-buttons>
                <ion-title>
                    支付结果
                </ion-title>
            </ion-toolbar>
        </ion-header>
        <ion-content>
            <div class="info">
                <img
                    style="width: 92px; height: 79px; margin-top: 40px"
                    src="@/assets/images/payresult.png"
                />
                <div class="tip">付款成功</div>
                <div class="price">实付：¥399.0</div>
                <label @click="gopages('/tabs/classRoom')">返回首页</label
                ><label @click="goOrderList('/play')">立即上课</label>
            </div>
        </ion-content>
    </ion-page>
</template>

<script lang="ts">
import { IonPage, IonContent, IonHeader, IonToolbar, IonButtons, IonBackButton, IonTitle, IonIcon } from '@ionic/vue';
import { personOutline, lockClosedOutline } from 'ionicons/icons';
import { reactive, toRefs } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { PublicService } from '@/utils/public';
const publicService = new PublicService();
export default {
  name: 'login-page',
  components: {
    IonPage, IonContent, IonHeader, IonToolbar, IonButtons, IonBackButton, IonTitle
  },
  setup() {
    const router = useRouter();
    const route = useRoute();
    let t: any;
    const state = reactive({
        url: route.query.url,
        fileList: [
            {
                title: '考音乐学院到底要不要跑课',
                size: 10,
                downNum: 2222,
                isMian: 1
            },
            {
                title: '考音乐学院到底要不要跑课',
                size: 10,
                downNum: 2222,
                isMian: 0
            },
            {
                title: '考音乐学院到底要不要跑课',
                size: 10,
                downNum: 2222,
                isMian: 1
            }
        ],
    })


    function gopages(path: any){
      router.push(
        {
          path
        }
      )
    }

    function goOrderList(path: any){
        router.replace({
          path,
          query: {
            ...route.query
          }
        })
    }
   


    return {
      ...toRefs(state),
      gopages,
      goOrderList
    }
  }
}
</script>

<style lang="scss" scoped>
 .info {
    background: #fff;
    font-size: 12px;
    text-align: center;
    padding-bottom: 10px;
    .tip {
        font-weight: bold;
        font-size: 18px;
        color: #242325;
        margin-top: 20px;
    }
    .price {
        font-weight: 400;
        font-size: 14px;
        color: #242424;
        margin: 10px 0px;
    }
    label {
        width: 77px;
        height: 28px;
        display: inline-block;
        background: #ffffff;
        border: 1px solid #242424;
        border-radius: 2px;
        font-weight: 400;
        font-size: 13px;
        color: #242425;
        text-align: center;
        margin: 5px;
        line-height: 28px;
    }
}
.popupcontent {
    border-radius: 30rpx 30rpx 0 0;
    position: relative;
    .popuptitle {
        width: 750rpx;
        height: 96rpx;
        line-height: 96rpx;
        font-family: PingFangSC-Medium;
        font-weight: 500;
        font-size: 32rpx;
        color: #2e3033;
        letter-spacing: 0;
        text-align: center;
        position: relative;
        .icon {
            position: absolute;
            right: 20rpx;
            top: 30rpx;
        }
    }
    .listcon {
        padding: 0rpx 20rpx;
        u-icon {
            margin-right: 10rpx;
        }
        .condesc {
            padding: 5rpx 0rpx 20rpx 37rpx;
        }
    }
}
.tabbar_bottom {
    position: fixed;
    left: 0;
    bottom: 0;
    height: 108rpx;
    background: #ffffff;
    padding-left: 30rpx;
    padding-right: 30rpx;
    padding-bottom: 16rpx;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: content-box;
    border-top: 1rpx solid #efefef;
    z-index: 101;

    .footer {
        padding: 16rpx 0rpx;
        text-align: center;
        image {
            width: 36rpx;
            height: 36rpx;
        }
    }
}
</style>
